import request from '@/utils/request'

export default {

  //1.事件列表（条件查询分页）
  getThingListPage(current, limit, thingQuery) {
    return request({
      url: `/thing/pageThingCondition/${current}/${limit}`,
      method: 'post',
      // teacherQuery条件对象，后端用RequestBody接受Json。Data表示把我们的数据用Json传递
      data: thingQuery
    })
  },
  //删除讲师
  deleteThing(id) {
    return request({
      url: `/thing/${id}`,
      method: 'delete'
    })
  },
  competeThing(id) {
    return request({
      url: `/thing/${id}`,
      method: 'get'
    })
  },
  //添加讲师
  addThing(thing) {
    return request({
      url: `/thing`,
      method: 'post',
      data: thing
    })
  },
}
